
***************************************************
* Figure 1 - Mean (SE) trust in healthcare actors *
***************************************************
//MDs
svy: mean q20_a

//Nurses
svy: mean q20_b

//Medical research scientists
svy: mean q20_c

//Pharma
svy: mean q20_d

//Health insurance
svy: mean q20_e

//FDA
svy: mean q20_f

//CDC
svy: mean q20_g

//Federal Public health experts
svy: mean q20_h

//State public health agency
svy: mean q20_i


*****************************************
* Trust in actors by vaccination status *
*****************************************
//MDs 
sort vaccinated
by vaccinated: tab q20_a [aweight = weight], sum(q20_a)
mvtest means q20_a [aweight = weight], by(vaccinated)

//Medical research scientists
by vaccinated: tab q20_c [aweight = weight], sum(q20_c)
mvtest means q20_c [aweight = weight], by(vaccinated)

//Federal Public health experts
by vaccinated: tab q20_h [aweight = weight], sum(q20_h)
mvtest means q20_h [aweight = weight], by(vaccinated)

***********************************************
* Figure 2 - Performance of healthcare actors *
***********************************************
//MDs
*very good/excellent
tab q21_aHL [aweight = weight]
tabstat q21_aHL [aweight = weight], statistics(semean)

//Nurses
tab q21_bHL [aweight = weight]
tabstat q21_bHL [aweight = weight], statistics(semean)

//Medical research scientists
tab q21_cHL [aweight = weight]
tabstat q21_cHL [aweight = weight], statistics(semean)

//Pharmaceutical companies
tab q21_dHL [aweight = weight]
tabstat q21_dHL [aweight = weight], statistics(semean)

//Health insurance companies
tab q21_eHL [aweight = weight]
tabstat q21_eHL [aweight = weight], statistics(semean)

//FDA
tab q21_fHL [aweight = weight]
tabstat q21_fHL [aweight = weight], statistics(semean)

//CDC
tab q21_gHL [aweight = weight]
tabstat q21_gHL [aweight = weight], statistics(semean)

//State Public Health Agency
tab q21_iHL [aweight = weight]
tabstat q21_iHL [aweight = weight], statistics(semean)

//Federal public health experts
tab q21_hHL [aweight = weight]
tabstat q21_hHL [aweight = weight], statistics(semean)


*************************************************************************
* Table 1 - Ratings of healthcare actors' performance amid the pandemic *
*************************************************************************

*MDs
// by Voting status (2020)
sort voted2020
by voted2020: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight] if partyID_3 < 3, by(partyID_3)
by partyID_3: tabstat q21_aHL [aweight = weight], statistics(semean)

//by age
sort age4
by age4: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_aHL [aweight = weight]
mvtest means q21_aHL [aweight = weight], by(gender)

*************************
*Nurses

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_bHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight] if partyID_3 < 3, by(partyID_3)

//by age
sort age4
by age4: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_bHL [aweight = weight]
mvtest means q21_bHL [aweight = weight], by(gender)

**********************************
*Medical research scientists

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_cHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight] if partyID_3 < 3, by(partyID_3)

//by age
sort age4
by age4: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_cHL [aweight = weight]
mvtest means q21_cHL [aweight = weight], by(gender)

********************************
*Pharmaceutical companies

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_dHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(partyID_3)

//by age
sort age4
by age4: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_dHL [aweight = weight]
mvtest means q21_dHL [aweight = weight], by(gender)


*********************************
*Health insurance companies

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_eHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight] if partyID_3 < 3, by(partyID_3)

//by age
sort age4
by age4: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_eHL [aweight = weight]
mvtest means q21_eHL [aweight = weight], by(gender)


***************************
*FDA

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_fHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(partyID_3)

//by age
sort age4
by age4: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_fHL [aweight = weight]
mvtest means q21_fHL [aweight = weight], by(gender)


******************************
*CDC

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_gHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight] if partyID_3 < 3, by(partyID_3)

//by age
sort age4
by age4: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_gHL [aweight = weight]
mvtest means q21_gHL [aweight = weight], by(gender)


********************************
*Federal public health experts

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_hHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(partyID_3)

//by age
sort age4
by age4: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_hHL [aweight = weight]
mvtest means q21_hHL [aweight = weight], by(gender)


********************************
*State Public Health Agency

// by Voting status (2020)
sort voted2020
by voted2020: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(voted2020)

//by PID
sort partyID_3
by partyID_3: tabstat q21_iHL [aweight = weight], statistics(semean)
by partyID_3: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight] if partyID_3 < 3, by(partyID_3)

//by age
sort age4
by age4: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(age4)

//by education
sort educ3
by educ3: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(educ3)

//by race
sort race3
by race3: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(race3)

//by income
sort income3
by income3: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(income3)

//by type of community
sort q3
by q3: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(q3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(vaccinated)

//by gender
sort gender
by gender: tab q21_iHL [aweight = weight]
mvtest means q21_iHL [aweight = weight], by(gender)


**********************************************
* Figure 3 - Confidence in Healthcare Actors *
**********************************************
//Medical Research Scientists
*a great deal/a fair amount of confidence that they are competent
tab highComp [aweight = weight]

*advice: a great deal/ a fair amount
tab highadvice [aweight = weight]

*follow: a great deal/ a fair amount
tab highfollow [aweight = weight]


//Public Health Experts
*a great deal/a fair amount of confidence that they are competent
tab ph_highComp [aweight = weight]

*ph_advice: *a great deal/ a fair amount
tab ph_highadvice [aweight = weight]

*ph_follow: a great deal/a fair amount
tab ph_highfollow [aweight = weight]


**********************************************
* Table 2 - Covid impact on trust in doctors *
**********************************************
//all participants
*Covid-19
tab md_covid [aweight = weight]

*precautions
tab md_precautions [aweight = weight]

*opinions
tab md_opinions [aweight = weight]

*views
sum md_views [aweight = weight]


//by Partisanship
sort partyID_3

*Covid-19
by partyID_3: tab md_covid [aweight = weight]

*precautions
by partyID_3: tab md_precautions [aweight = weight]

*opinions
by partyID_3: tab md_opinions [aweight = weight]

*views
by partyID_3: sum md_views [aweight = weight]


//by vaccination status
sort vaccinated

*Covid-19
by vaccinated: tab md_covid [aweight = weight]

*precautions
by vaccinated: tab md_precautions [aweight = weight]

*opinions
by vaccinated: tab md_opinions [aweight = weight]

*views
by vaccinated: sum md_views [aweight = weight]


****************************************
* Figure 4 - Beliefs about professions *
****************************************
//work harder
quietly svy: reg cat_q19_a i.q19_treat
eststo workHarder

//interested in helping
quietly svy: reg cat_q19_b i.q19_treat
eststo helping

//interested in becoming wealthier
quietly svy: reg cat_q19_c i.q19_treat
eststo wealthier

//interested in gaining prestige
quietly svy: reg cat_q19_d i.q19_treat
eststo prestige

//Care about me
quietly svy: reg cat_q19_e i.q19_treat
eststo care

//Can be trusted
quietly svy: reg cat_q19_f i.q19_treat
eststo trusted

coefplot workHarder helping wealthier prestige care trusted, drop(_cons) xline(0) title("") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2)) legend(order(2 " Work Harder" 4 "Interested in Helping" 6 "Interested in Wealth" 8 "Interested in Prestige" 10 "Care about me" 12 "Can be trusted"))

* Balance tests
svy: mlogit q19_treat i.age4 i.partyID_3 vaccinated voted2020 faminc_new i.race3 i.educ3 female


********************************************************************
* Figure 5 - Support for a hypothetical healthcare policy proposal *
********************************************************************
sort q6_treat
quietly svy: reg proposalSupport i.q6_treat
coefplot, drop(_cons) xline(0) xtitle("Difference in support compared to AMA baseline") title("Support for Healthcare Cost Control Proposal") caption("Baseline: 'Supported by AMA' (M = 2.63; SE = 0.13; p < .001); Scale range 0-4, where 4 is max. support")

* Balance tests
svy: mlogit q6_treat i.age4 i.partyID_3 vaccinated voted2020 faminc_new i.race3 i.educ3 female


********************************************************************
* Table 3 - Support for a hypothetical healthcare policy proposal  *
********************************************************************
by q6_treat: tab proposalSupport [aweight = weight], sum(proposalSupport)


******************************
* Confidence in institutions *
******************************
*The public school system
//by PID
sort partyID_3
by partyID_3: tab q22_fHL [aweight = weight]
mvtest means q22_fHL [aweight = weight], by(partyID_3)


*Newspapers
//by PID
sort partyID_3
by partyID_3: tab q22_lHL [aweight = weight]
mvtest means q22_lHL [aweight = weight] if partyID_3 <3, by(partyID_3)


*Organized labor
//by PID
sort partyID_3
by partyID_3: tab q22_gHL [aweight = weight]
mvtest means q22_gHL [aweight = weight], by(partyID_3)


*small business
//by PID
sort partyID_3
by partyID_3: tab q22_aHL [aweight = weight]
mvtest means q22_aHL [aweight = weight] if partyID_3 <3, by(partyID_3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q22_aHL [aweight = weight]
mvtest means q22_aHL [aweight = weight], by(vaccinated)


*military
//by PID
sort partyID_3
by partyID_3: tab q22_bHL [aweight = weight]
mvtest means q22_bHL [aweight = weight] if partyID_3 <3, by(partyID_3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q22_bHL [aweight = weight]
mvtest means q22_bHL [aweight = weight], by(vaccinated)


*The police
//by PID
sort partyID_3
by partyID_3: tab q22_cHL [aweight = weight]
mvtest means q22_cHL [aweight = weight] if partyID_3 <3, by(partyID_3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q22_cHL [aweight = weight]
mvtest means q22_cHL [aweight = weight], by(vaccinated)


*The church
//by PID
sort partyID_3
by partyID_3: tab q22_eHL [aweight = weight]
mvtest means q22_eHL [aweight = weight] if partyID_3 <3, by(partyID_3)


*SCOTUS
//by PID
sort partyID_3
by partyID_3: tab q22_jHL [aweight = weight]
mvtest means q22_jHL [aweight = weight] if partyID_3 <3, by(partyID_3)

//by Covid vaccination status
sort vaccinated
by vaccinated: tab q22_jHL [aweight = weight]
mvtest means q22_jHL [aweight = weight], by(vaccinated)


*The medical system
//by PID
sort partyID_3
by partyID_3: tab q22_dHL [aweight = weight]
mvtest means q22_dHL [aweight = weight] if partyID_3 <3, by(partyID_3)
mvtest means q22_dHL [aweight = weight] if partyID_3 >1, by(partyID_3)


//by Covid vaccination status
sort vaccinated
by vaccinated: tab q22_dHL [aweight = weight]
mvtest means q22_dHL [aweight = weight], by(vaccinated)


*Banks
//by PID
sort partyID_3
by partyID_3: tab q22_hHL [aweight = weight]
mvtest means q22_hHL [aweight = weight] if partyID_3 <3, by(partyID_3)
mvtest means q22_hHL [aweight = weight] if partyID_3 >1, by(partyID_3)


*Big tech
//by PID
sort partyID_3
by partyID_3: tab q22_iHL [aweight = weight]
mvtest means q22_iHL [aweight = weight] if partyID_3 <3, by(partyID_3)
mvtest means q22_iHL [aweight = weight] if partyID_3 >1, by(partyID_3)



************
* Appendix *
************

********************************************************************************
* Figure A1 - Mean (SE) trust in a number of healthcare actors by partisanship *
********************************************************************************
//MDs
sort partyID_3
by partyID_3: tab q20_a [aweight = weight], sum(q20_a)
mvtest means q20_a [aweight = weight] if partyID_3 < 3, by(partyID_3)

//Nurses
by partyID_3: tab q20_b [aweight = weight], sum(q20_b)
mvtest means q20_b [aweight = weight] if partyID_3 < 3, by(partyID_3)

//Medical research scientists
by partyID_3: tab q20_c [aweight = weight], sum(q20_c)
mvtest means q20_c [aweight = weight], by(partyID_3)

//Pharma
by partyID_3: tab q20_d [aweight = weight], sum(q20_d)
mvtest means q20_d [aweight = weight] if partyID_3 < 3, by(partyID_3)

//Health insurance
by partyID_3: tab q20_e [aweight = weight], sum(q20_e)
mvtest means q20_e [aweight = weight] if partyID_3 < 3, by(partyID_3)
mvtest means q20_e [aweight = weight], by(partyID_3)

//FDA
by partyID_3: tab q20_f [aweight = weight], sum(q20_f)
mvtest means q20_f [aweight = weight], by(partyID_3)

//CDC
by partyID_3: tab q20_g [aweight = weight], sum(q20_g)
mvtest means q20_g [aweight = weight], by(partyID_3)

//Federal Public health experts
by partyID_3: tab q20_h [aweight = weight], sum(q20_h)
mvtest means q20_h [aweight = weight], by(partyID_3)

//State public health agency
by partyID_3: tab q20_i [aweight = weight], sum(q20_i)
mvtest means q20_i [aweight = weight], by(partyID_3)

***************************************************
* Difference between partisans for various actors *
***************************************************
//MDs vs. CDC
svy: reg q20_a i.partyID_3 if partyID_3 < 3
est store md

svy: reg q20_g i.partyID_3 if partyID_3 < 3
est store cdc

suest md cdc
test [md = cdc]

//Nurses vs. State Public Health Experts
svy: reg q20_b i.partyID_3 if partyID_3 < 3
est store nurses

svy: reg q20_i i.partyID_3 if partyID_3 < 3
est store sph

suest nurses sph
test [nurses = sph]

//Medical Research Scientists vs. Public Health Experts
svy: reg q20_c i.partyID_3 if partyID_3 < 3
est store medres

svy: reg q20_i i.partyID_3 if partyID_3 < 3
est store sph

suest medres sph
test [medres = sph]

//Medical Research Scientists vs. CDC
suest medres cdc
test [medres = cdc]


*********************************************************************
* Figure A2 - Percentage of participants who rated each healthcare  *
* actor's performance as "Excellent" or "Very good" by partisanship *
*********************************************************************

*MDs
by partyID_3: tabstat q21_aHL [aweight = weight], statistics(semean)

*Nurses
by partyID_3: tabstat q21_bHL [aweight = weight], statistics(semean)

*Medical research scientists
by partyID_3: tabstat q21_cHL [aweight = weight], statistics(semean)

*Pharmaceutical companies
by partyID_3: tabstat q21_dHL [aweight = weight], statistics(semean)

*Health insurance companies
by partyID_3: tabstat q21_eHL [aweight = weight], statistics(semean)

*FDA
by partyID_3: tabstat q21_fHL [aweight = weight], statistics(semean)

*CDC
by partyID_3: tabstat q21_gHL [aweight = weight], statistics(semean)

*Federal public health experts
by partyID_3: tabstat q21_hHL [aweight = weight], statistics(semean)

*State Public Health Agency
by partyID_3: tabstat q21_iHL [aweight = weight], statistics(semean)


**************************************************************
* Table A1 - Confidence in Healthcare Actors by partisanship *
**************************************************************
//Medical Research Scientists
*Competence
sort partyID_3
by partyID_3: tab highComp [aweight = weight]
mvtest means highComp [aweight = weight], by(partyID_3)

*Advice
by partyID_3: tab highadvice [aweight = weight]
mvtest means highadvice [aweight = weight], by(partyID_3)

*Follow
by partyID_3: tab highfollow [aweight = weight]
mvtest means highfollow [aweight = weight], by(partyID_3)

//Public Health Experts
*Competence
sort partyID_3
by partyID_3: tab ph_highComp [aweight = weight]
mvtest means ph_highComp [aweight = weight], by(partyID_3)

*Advice
by partyID_3: tab ph_highadvice [aweight = weight]
mvtest means ph_highadvice [aweight = weight], by(partyID_3)

*Follow
by partyID_3: tab ph_highfollow [aweight = weight]
mvtest means ph_highfollow [aweight = weight], by(partyID_3)


***********************************************************************
* Figure A3 - Beliefs about professions (work harder) by partisanship *
***********************************************************************
quietly svy: reg cat_q19_a i.q19_treat if partyID_3 == 1
est store dems1

quietly svy: reg cat_q19_a i.q19_treat if partyID_3 == 2
est store reps1

quietly svy: reg cat_q19_a i.q19_treat if partyID_3 == 3
est store ind1

coefplot (dems1, label(Democrats)) (reps1, label(Republicans)) (ind1, label(Independents)), drop(_cons) xline(0) title("Work harder") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


**************************************************************************
* Figure A4 - Beliefs about professions (Can be trusted) by partisanship *
**************************************************************************
quietly svy: reg cat_q19_f i.q19_treat if partyID_3 == 1
est store dems6

quietly svy: reg cat_q19_f i.q19_treat if partyID_3 == 2
est store reps6

quietly svy: reg cat_q19_f i.q19_treat if partyID_3 == 3
est store ind6

coefplot (dems6, label(Democrats)) (reps6, label(Republicans)) (ind6, label(Independents)), drop(_cons) xline(0) title("Can be trusted") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


*************************************************************************
* Figure A5 - Beliefs about professions (Care about me) by partisanship *
*************************************************************************
quietly svy: reg cat_q19_e i.q19_treat if partyID_3 == 1
est store dems5

quietly svy: reg cat_q19_e i.q19_treat if partyID_3 == 2
est store reps5

quietly svy: reg cat_q19_e i.q19_treat if partyID_3 == 3
est store ind5

coefplot (dems5, label(Democrats)) (reps5, label(Republicans)) (ind5, label(Independents)), drop(_cons) xline(0) title("Care about people like me") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


******************************************************************************************
* Figure A6 - Beliefs about professions (interested in gaining prestige) by partisanship *
******************************************************************************************
quietly svy: reg cat_q19_d i.q19_treat if partyID_3 == 1
est store dems4

quietly svy: reg cat_q19_d i.q19_treat if partyID_3 == 2
est store reps4

quietly svy: reg cat_q19_d i.q19_treat if partyID_3 == 3
est store ind4

coefplot (dems4, label(Democrats)) (reps4, label(Republicans)) (ind4, label(Independents)), drop(_cons) xline(0) title("Are interested in gaining prestige") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


********************************************************************************************
* Figure A7 - Beliefs about professions (interested in becoming wealthier) by partisanship *
********************************************************************************************
quietly svy: reg cat_q19_c i.q19_treat if partyID_3 == 1
est store dems3

quietly svy: reg cat_q19_c i.q19_treat if partyID_3 == 2
est store reps3

quietly svy: reg cat_q19_c i.q19_treat if partyID_3 == 3
est store ind3

coefplot (dems3, label(Democrats)) (reps3, label(Republicans)) (ind3, label(Independents)), drop(_cons) xline(0) title("Are interested in becoming wealthier") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


*********************************************************************************
* Figure A8 - Beliefs about professions (interested in helping) by partisanship *
*********************************************************************************
quietly svy: reg cat_q19_b i.q19_treat if partyID_3 == 1
est store dems2

quietly svy: reg cat_q19_b i.q19_treat if partyID_3 == 2
est store reps2

quietly svy: reg cat_q19_b i.q19_treat if partyID_3 == 3
est store ind2

coefplot (dems2, label(Democrats)) (reps2, label(Republicans)) (ind2, label(Independents)), drop(_cons) xline(0) title("Are interested in helping others") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


*****************************************************************************
* Figure A9 - Beliefs about professions (work harder) by vaccination status *
*****************************************************************************
quietly svy: reg cat_q19_a i.q19_treat if vaccinated == 1
est store vax1

quietly svy: reg cat_q19_a i.q19_treat if vaccinated == 0
est store unvax1

coefplot (vax1, label(Vaccinated)) (unvax1, label(Unvaccinated)), drop(_cons) xline(0) title("Work harder") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


********************************************************************************
* Figure A10 - Beliefs about professions (Can be trusted) by vaccination status *
********************************************************************************
quietly svy: reg cat_q19_f i.q19_treat if vaccinated == 1
est store vax6

quietly svy: reg cat_q19_f i.q19_treat if vaccinated == 0
est store unvax6

coefplot (vax6, label(Vaccinated)) (unvax6, label(Unvaccinated)), drop(_cons) xline(0) title("Can be trusted") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


********************************************************************************
* Figure A11 - Beliefs about professions (Care about me) by vaccination status *
********************************************************************************
quietly svy: reg cat_q19_e i.q19_treat if vaccinated == 1
est store vax5

quietly svy: reg cat_q19_e i.q19_treat if vaccinated == 0
est store unvax5

coefplot (vax5, label(Vaccinated)) (unvax5, label(Unvaccinated)), drop(_cons) xline(0) title("Care about people like me") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


*************************************************************************************************
* Figure A12 - Beliefs about professions (interested in gaining prestige) by vaccination status *
*************************************************************************************************
quietly svy: reg cat_q19_d i.q19_treat if vaccinated == 1
est store vax4

quietly svy: reg cat_q19_d i.q19_treat if vaccinated == 0
est store unvax4

coefplot (vax4, label(Vaccinated)) (unvax4, label(Unvaccinated)), drop(_cons) xline(0) title("Are interested in gaining prestige") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))



***************************************************************************************************
* Figure A13 - Beliefs about professions (interested in becoming wealthier) by vaccination status *
***************************************************************************************************
quietly svy: reg cat_q19_c i.q19_treat if vaccinated == 1
est store vax3

quietly svy: reg cat_q19_c i.q19_treat if vaccinated == 0
est store unvax3

coefplot (vax3, label(Vaccinated)) (unvax3, label(Unvaccinated)), drop(_cons) xline(0) title("Are interested in becoming wealthier") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


****************************************************************************************
* Figure A14 - Beliefs about professions (interested in helping) by vaccination status *
****************************************************************************************
quietly svy: reg cat_q19_b i.q19_treat if vaccinated == 1
est store vax2

quietly svy: reg cat_q19_b i.q19_treat if vaccinated == 0
est store unvax2

coefplot (vax2, label(Vaccinated)) (unvax2, label(Unvaccinated)), drop(_cons) xline(0) title("Are interested in helping others") xtitle("Difference compared to doctors") xlabel(-2(0.5)2) xscale(range(-2(0.5)2))


*******************************************************************************
* Figure A15 - Support for a hypothetical healthcare proposal by partisanship *
*******************************************************************************
*DEMS
svy: reg proposalSupport i.q6_treat if partyID_3 == 1
est store dems

*REPS
svy: reg proposalSupport i.q6_treat if partyID_3 == 2
est store reps

*IND
svy: reg proposalSupport i.q6_treat if partyID_3 == 3
est store ind

//Democrats & Republicans only
coefplot (dems, label(Democrats)) (reps, label(Republicans)), drop(_cons) xline(0) xtitle("Difference in support compared to AMA baseline")


*************************************************************************************
* Figure A16 - Support for a hypothetical healthcare proposal by vaccination status *
*************************************************************************************
*vaccinated
svy: reg proposalSupport i.q6_treat if vaccinated == 1
est store vax0

*unvaccinated
svy: reg proposalSupport i.q6_treat if vaccinated == 0
est store unvax0

//All
coefplot (vax0, label(Vaccinated)) (unvax0, label(Unvaccinated)), drop(_cons) xline(0) xtitle("Difference in support compared to AMA baseline")


**********************************************
* Table A2 - Regressions generating Figure 4 *
**********************************************
//work harder
svy: reg cat_q19_a i.q19_treat

//interested in helping
svy: reg cat_q19_b i.q19_treat

//interested in becoming wealthier
svy: reg cat_q19_c i.q19_treat

//interested in gaining prestige
svy: reg cat_q19_d i.q19_treat

//Care about me
svy: reg cat_q19_e i.q19_treat

//Can be trusted
svy: reg cat_q19_f i.q19_treat


*********************************************
* Table A3 - Regression generating Figure 5 *
*********************************************
svy: reg proposalSupport i.q6_treat